package 简单工厂模式;

public class ProductFactory {
    public  static Product createProduct(String name){
        if ("电脑".equals(name)){
            return  new Computer();
        }
        if ("手机".equals(name)){
            return  new Mobile();
        }
        return null;
    }
}
